package com.jzy.gulimall.ssoserver.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author jzy
 * @date 2020/9/17 21:12
 */
@Controller
public class LoginController {

    @PostMapping("/login")
    public String login(@RequestBody String url){
        //

        return "";
    }


    @GetMapping("/login.html")
    public String toLogin(@RequestParam("redirect") String url, Model model){
        model.addAttribute("redirect", url);
        return "login";
    }
}
